<?php
    $option = get_option('kkfashion_1_settings'); 
	if(!is_home()){
?>
<div class="hotline-inner hotline">
<?php get_sidebar('hotline') ?>                
</div>
<?php }else{ ?>
<div class="hotline-inner hotline"><div class="container" style="padding:0;"></div></div>
<?php } ?>

<style type="text/css">
@media (max-width: 767px){
  .widget_newsletterwidget .col-12 {
  padding: 0 15px;
  }
  .register {
    margin-bottom: 5px;
    padding: 10px 0;
  }
}
</style>
   <div class="register">
        <div class="container">
            <div class="row">
                <?php dynamic_sidebar('promo_area') ?>
            </div>
        </div>
    </div>
    <div class="news-footer clearfix">
        <div class="container">
            <div class="row">
			 <div class="col-lg-2 col-sm-4 col-12 news-footer-item">
                    <h6>SHOP ONLINE<span class="visible-sm pull-right pull-down-sm"></span></h6>
                    <ul>
                        <li><a href="<?php echo site_url() ?>/product-category/dam-cong-so-3">Đầm công sở</a></li>
                        <li><a href="<?php echo site_url() ?>/product-category/dam-da-hoi">Đầm dạ hội</a></li>
                        <li><a href="<?php echo site_url() ?>/product-category/phu-kien">Phụ kiện</a></li>
                        <li><a href="<?php echo site_url() ?>/product-category/vay-chong-nang-2/">Váy chống nắng</a></li>
                        <li><a href="<?php echo site_url() ?>/product-category/ao-nu/">Áo sơ mi nữ</a></li>
                    </ul>
                </div>
				                <div class="col-lg-2 col-sm-4 col-12 news-footer-item">
                    <h6>Bộ sưu tập<span class="visible-sm pull-right pull-down-sm"></span></h6>
                    <ul>
                    <?php 
                    $album = nggdb::find_album(0);
                    foreach($album->gallery_ids as $gallery_id){
                        $gallery = nggdb::find_gallery( $gallery_id );
                        if($gallery->slug=='home-slideshow') continue; ?>
                        <li><a href="<?php echo site_url() ?>/chi-tiet-bo-suu-tap/<?php echo $gallery->slug ?>"><?php echo $gallery->title ?></a></li>
                    <?php } ?>
                    </ul>
                </div>
				<div class="col-lg-2 col-sm-4 col-12 news-footer-item">
                    <h6>TIN TỨC<span class="visible-sm pull-right pull-down-sm"></span></h6>
                    <ul> 
                    <?php
                      wp_reset_query();
                      $posts_per_page = 4;
                      query_posts(array('cat' => 6,'posts_per_page'=>$posts_per_page));
                      while (have_posts()): the_post(); ?>
                        <li><a href="<?php the_permalink() ?>"><?php the_title() ?></a></li>
                     <?php endwhile; ?>
                    </ul>
                </div>
                 <div class="col-lg-3 col-sm-4 col-12 news-footer-item">
                    <h6>SỰ KIỆN<span class="visible-sm pull-right pull-down-sm"></span></h6>
                    <ul>
                        <?php
                          wp_reset_query();
                          $posts_per_page = 3;
                          query_posts(array('cat' => 5,'posts_per_page'=>$posts_per_page));
                          while (have_posts()): the_post(); ?>
                            <li><a href="<?php the_permalink() ?>"><?php the_title() ?></a></li>
                         <?php endwhile; ?>
                    </ul>
                </div>
                 

                 <div class="col-lg-3 col-sm-4 col-12 news-footer-item">
                    <h6>KHUYẾN MÃI<span class="visible-sm pull-right pull-down-sm"></span></h6>
                    <ul>
                        <?php
                          wp_reset_query();
                          $posts_per_page = 4;
                          query_posts(array('cat' => 4,'posts_per_page'=>$posts_per_page));
                          while (have_posts()): the_post(); ?>
                            <li><a href="<?php the_permalink() ?>"><?php the_title() ?></a></li>
                         <?php endwhile; ?>
                    </ul>
                </div>
               
                
            </div> 
        </div>                 
    </div> 

    <div class="footer">
        <div class="container">
            <div class="row">
                <div class="col-lg-6 col-sm-12 col-12 contact-information">
                    <?php wp_nav_menu(array( 'menu_class' => 'menu', 'menu' => 'Footer Menu', 'depth' => 1,'container' => 'none')); ?>
                    <div class="address">
                        <?php echo $option['footer_address'] ?>
                        Tag: <?php 
                        foreach(explode(",", $option['footer_tags']) as $tag ){
                            $tagurl = get_site_url().'/product-tag/'.str_replace(' ','-',trim(vn_str_filter($tag)));
                            echo "<a href='$tagurl'>$tag</a>, "; 
                        }
						?>
                    </div>
                </div>            
                <div class="col-lg-6 col-sm-12 col-12 list-showroom">
                    <?php //echo $option['footer_showroom'] ?>
					<h4>HỆ THỐNG SHOWROOM K&K </h4>
					<ul>
						<li>Showroom 1: 268 Tô Hiến Thành, P.15, Q.10, TPHCM. ĐT: (08) 54 050 020 </li>
						<li> Showroom 2: 78 Trần Quang Diệu, P.14, Q.3, TP.HCM. ĐT: (08) 35 087 080</li>
						<li> Showroom 3: 248B Phan Đình Phùng, P.1, Q. Phú Nhuận. ĐT: (08) 35 070 456 </li>
						<li> Showroom 4: 259 Nguyễn Trãi, P.NCTrinh, Q.1, TP.HCM. ĐT: (08) 62 913 241 </li>
						<li> Showroom 5: 664 Quang Trung, P.11, Q. Gò Vấp, TP.HCM. ĐT: (08) 62 99 22 33 </li>
						<li> Shop Online: 78 Trần Quang Diệu, P.14, Q.3, TP.HCM. ĐT: (08) 62 66 22 33</li>
					</ul>
                </div>
            </div>
        </div>
    </div>
    <script src="<?php echo bloginfo('template_url'); ?>/js/custom.js"></script>
    
<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery('#prosize .size').click(function() {
            eleval = jQuery(this).attr('itemid');
            jQuery('#pa_size option').each(function() {
                if (jQuery(this).val() === eleval) {
                    jQuery("#pa_size option").attr('selected', false);
                    jQuery(this).attr('selected', 'selected');
                }
            });
            jQuery("#pa_size").change();
        });
        //choose S to default 
        setInterval(function() {
            jQuery("#pa_size").change()
        }, 2000);
    });
</script>
  </body>
</html>